package com.rytong.tools.ui;

import android.content.Context;
import android.widget.LinearLayout;

/**该类为程序最大布局的包装类，主要作用是处理键盘弹出，收回的事件。*/
public class LPScreenLayout extends LinearLayout{
	
    private OnResizeListener mListener; 

	public LPScreenLayout(Context context) {
		super(context);
	}
    
    public interface OnResizeListener { 
        void OnResize(int w, int h, int oldw, int oldh); 
    } 
     
    public void setOnResizeListener(OnResizeListener l) { 
        mListener = l; 
    } 
     
    @Override 
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {     
        super.onSizeChanged(w, h, oldw, oldh); 
        if (mListener != null) { 
            mListener.OnResize(w, h, oldw, oldh); 
        } 
    } 
}
